<?php

namespace System\Core;

if (!defined('BASEPATH')) die('Access Denied.');

/**
 * µMVC Framework (c) 2011.
 * 
 * PHP5 MVC Framework software for PHP 5.2.17 or later
 * 
 * @package         µMVC
 * @filename        system/core/bootstrap.php
 * @copyright       Lanz (c) 2011.
 * 
 */

/**
 * The Bootstrap
 * Loads the core functionallity of the Framework and runs the Front Controller.
 * 
 * @package         µMVC
 * @subpackage      Core
 * @category        System
 */

// Load the core components that the autoloader can not handle.
require_once 'errors.php';
require_once 'common.php';
require_once BASEPATH.'configs'.DS.'constants.php';

// Finally, instanciate the autoloader. This will automatically load all
// .class.php files from now on.
require_once 'autoloader.class.php';
$autoloader = new Autoloader();

// Instanciates some basic classes like the DB.
Registry::instance()->autoLoad();

// Create and run the front controller.
FrontController::instance()->run();

?>
